#include<iostream>
#include<fstream>
#include<algorithm>
#include<cmath>
#include<cstdio>
#include<string>
#include<cstring>
using namespace std;
int n,a[200005],p=0x7ffffff;
int check()
{
	for(int i=1;i<=n;i++) if(a[i]!=p) return 1;
	return 0;
}
int main()
{
	freopen("fruit.in","r",stdin);
	freopen("fruit.out","w",stdout);
	cin>>n;
	for(int i=1;i<=n;i++) scanf("%d",&a[i]);
	while(check())
	{
		for(int i=1;i<n;i++)
		{
			if(a[i]==p) break;
			if(a[i]==a[i+1]&&a[i+1]!=p)
			{
				printf("%d ",i);
				a[i]=p;
			}
		}
		if(a[n]!=a[n-1])
		{
			printf("%d ",n);
			a[n]=p;
		}
		cout<<endl;
		for(int i=1;i<=n;i++)
		{
			if(a[i]==p)
			{
				int t=a[i];
				for(int j=i+1;j<=n;j++)
					a[j]=a[j-1];
				a[n]=t;
			}
		}
	}
	return 0;
}
